import http from "@/utils/http"

enum Api{
  whiteAdd="/api/blackWhite/saveOrUpdateWhiteList",
  whitePage="/api/blackWhite/pageWhiteList",
  whiteList="/api/blackWhite/listWhiteList",
  detailList="/api/blackWhite/detailWhiteList",
  deteleList="/api/blackWhite/deleteWhiteList",


  blackAdd="/api/blackWhite/saveOrUpdateBlackList",
  blackPage="/api/blackWhite/pageBlackList",
  blackList="/api/blackWhite/listBlackList",
  detailBlackList="/api/blackWhite/detailBlackList",
  deteleBlackList="/api/blackWhite/deleteBlackList",
}

// 黑名单
export const deteleBlackListDel=async (data:{id:string})=>{
  return http.delete(Api.deteleBlackList,data)
}

export const blackAddPost=async(data:any)=>{
  return http.post(Api.blackAdd,data)
}

export const blackPagePost = async (data:any)=>{
  return http.post(Api.blackPage,data)
}

export const blackListPost=async (data:any)=>{
  return http.post(Api.blackList,data)
}

export const  detailBlackListGet=async(data:any)=>{
  return http.getRestApi(Api.detailBlackList,data)
}


// b白名单
export const deteleListDel=async (data:{id:string})=>{
  return http.delete(Api.deteleList,data)
}
export const whiteAddPost=async(data:any)=>{
  return http.post(Api.whiteAdd,data)
}

export const whitePagePost = async (data:any)=>{
  return http.post(Api.whitePage,data)
}

export const whiteListPost=async (data:any)=>{
  return http.post(Api.whiteList,data)
}

export const  detailListGet=async(data:any)=>{
  return http.getRestApi(Api.detailList,data)
}

